/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.jcrsistemas.componentes;

import java.awt.event.KeyEvent;
import javax.swing.JRadioButton;

/**
 *
 * @author Kadu
 */
public class SysRadio extends JRadioButton {

    private boolean enterChangeFocus;

    public SysRadio() {
        super();
        this.enterChangeFocus = true;
        addKeyListener(new java.awt.event.KeyAdapter() {

            @Override
            public void keyPressed(java.awt.event.KeyEvent evt) {
                if (evt.getKeyCode() == KeyEvent.VK_ENTER && enterChangeFocus) {
                    transferFocus();
                }
            }
        });
    }

    public void setEnterChangeFocus(boolean enterChangeFocus) {
        this.enterChangeFocus = enterChangeFocus;
    }

    public boolean getEnterChangeFocus() {
        return this.enterChangeFocus;
    }
}
